attribute vec3 direction;
attribute float scale;

uniform float uTime;
uniform float uSize;

void main() {
    vec4 g_Position = vec4(position, 1.0);
    vec4 w_Position = modelMatrix * g_Position;

    //点坐标=向量*时间
    w_Position.xyz += direction * uTime * 10.0;

    gl_Position = projectionMatrix * viewMatrix * w_Position;
    gl_PointSize = uSize * scale - uTime * 5.0;
}